﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Pampa.CRUD.UI.CustomControls;

namespace Pampa.MVC.Controllers
{
    public class EntitySelectorController : AbstractController
    {
        public JsonResult GetList(string controlId, string entityName, string value, int maxtam, string propertyId, string propertyDesc)
        {
            return BuildResponse(() => EntitySelector.GetList(controlId, entityName, value, maxtam, propertyId, propertyDesc));
        }

        public JsonResult GetFilteredList(string controlId, string entityName, string value, int maxtam, string property, string parentValue, string propertyId, string propertyDesc)
        {
            return BuildResponse(() => EntitySelector.GetFilteredList(controlId, entityName, value, maxtam, property, parentValue, propertyId, propertyDesc));
        }
    }
}
